import { defineStore } from 'pinia'
import {getUser} from "@/api/user.js";

export const userStore = defineStore({
  id: 'user',
  state: () => ({
    userInfo: {
    },
    isCollapse: false,
  }),
  getters: {

  },
  actions: {
    async getUserInfo() {
      const res = await getUser()
      this.userInfo = res.data
      return res.data
    }
  },
  persist: true,
})
